package com.zimmor.rocketmq.entity;

import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;

/**
 * @Author:zimmor
 * @Date: 2023/2/17 10:09
 * @Description
 * @version: 1.0.0
 */

public class RocketMessage implements Message {
    private Object payload;
    private MessageHeaders messageHeaders;
    @Override
    public Object getPayload() {
        return payload;
    }

    @Override
    public MessageHeaders getHeaders() {
        return messageHeaders;
    }

    public RocketMessage(Object payload, MessageHeaders messageHeaders) {
        this.payload = payload;
        this.messageHeaders = messageHeaders;
    }

    public RocketMessage(Object payload) {
        this.payload = payload;
    }

    public RocketMessage() {
    }

    public void setPayload(Object payload) {
        this.payload = payload;
    }

    public void setMessageHeaders(MessageHeaders messageHeaders) {
        this.messageHeaders = messageHeaders;
    }
}
